<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%
    String basePath = request.getContextPath();
    String path = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+basePath+"/";
    request.setAttribute("path",path);
%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Simple Responsive Admin</title>
<!-- BOOTSTRAP STYLES-->
<link href="assets/css/bootstrap.css" rel="stylesheet" />
<!-- FONTAWESOME STYLES-->
<link href="assets/css/font-awesome.css" rel="stylesheet" />
<!-- CUSTOM STYLES-->
<link href="assets/css/custom.css" rel="stylesheet" />
<!-- GOOGLE FONTS-->
<link href='http://fonts.googleapis.com/css?family=Open+Sans'
	rel='stylesheet' type='text/css' />
<script type="text/javascript" src="${path}/js/jquery-2.1.1.min.js"></script>
<script language="JavaScript">

    function checkboxAll() {
        var checkstr = "";
        $("input:checkbox[name=id]:checked").each(function (i) {
            if (checkstr != "") {    //将所选的各项记录的id形成字符串，并以“，”分割
                checkstr += ",";
            }
            checkstr += $(this).val();
        });
        $("#checkBoxId").val(checkstr)
    }
    /* 是否全选标记 */
    var checkedAll = false;
    /* 全选/取消全选
     * formName 所在form的name值
     * checkboxName checkbox的name值
     * 注意：所有checkbox的name值都必须一样，这样才能达到全选的效果
     */
    function selectAll(form1, id) {
        var form = document.all.item(form1);
        /* var elements = form.elements[id];*/
        var elements = document.getElementsByTagName("input");
        for (var i = 0; i < elements.length; i++) {
            var e = elements[i];
            if (checkedAll) {
                e.checked = false;
                form.alls.checked = false;
            } else {
                e.checked = true;
                form.alls.checked = true;
                var checkstr = "";
                $("input:checkbox[name=id]:checked").each(function (i) {
                    if (checkstr != "") {    //将所选的各项记录的id形成字符串，并以“，”分割
                        checkstr += ",";
                    }
                    checkstr += $(this).val();
                });
                $("#ids").val(checkstr)
            }
        }
        if (checkedAll) {
            checkedAll = false;
        } else {
            checkedAll = true;
        }
    }

</script>
</head>
<body>



	<div id="wrapper">
		<div class="navbar navbar-inverse navbar-fixed-top">
			<div class="adjust-nav">
				<div class="navbar-header">
					<button type="button" class="navbar-toggle" data-toggle="collapse"
						data-target=".sidebar-collapse">
						<span class="icon-bar"></span> <span class="icon-bar"></span> <span
							class="icon-bar"></span>
					</button>
					<a class="navbar-brand" href="#"> 知行合一 </a>
				</div>
			</div>
		</div>
		<!-- /. NAV TOP  -->
		<nav class="navbar-default navbar-side" role="navigation">
			<div class="sidebar-collapse">
				<ul class="nav" id="main-menu">
					<li><a href="photographerList"><i class="fa fa-desktop "></i>摄影师管理
							<span class="badge">1</span></a></li>
					<li><a href="themeList"><i class="fa fa-desktop "></i>摄影主题
							<span class="badge">2</span></a></li>


					<li class="active-link"><a href="photoorderList"><i
							class="fa fa-table "></i>订单列表 <span class="badge">3</span></a></li>
							
					<li class="active-link"><a href="scheduleManagement"><i
							class="fa fa-table "></i>档期管理 <span class="badge">4</span></a></li>		
				</ul>
			</div>

		</nav>
		<!-- /. NAV SIDE  -->
		<div id="page-wrapper">
			<div id="page-inner" name="page-inner">
				<div class="row">
					<div class="col-md-12">
						<h2>订单列表</h2>
					</div>
				</div>
				<!-- /. ROW  -->

				<div class="row">
					<div class="col-lg-12 col-md-12">
						<table class="table table-striped table-bordered table-hover">
							<thead>
								<tr>
									<th>订单号</th>
									<th>用户</th>
									<th>摄影师</th>
									<th>拍摄主题</th>
									<th>拍摄日期</th>
									<th>状态</th>
									<th>金额</th>
									<th>操作</th>
								</tr>
							</thead>
							<tbody>
								<c:forEach items="${orderUserList}" var="items">
									<tr>
										<td><span>${items.orderCode}</span><input type="text"
											style="display: none;"></td>
										<td><span>${items.name}(${items.phone}) </span><input
											type="text" style="display: none;"></td>
										<td><span>${items.photographerName}</span><input
											type="text" style="display: none;"></td>
										<td><span>${items.themeTitle}</span><input type="text"
											style="display: none;"></td>
										<td><span>${fn:substring(items.shotDate, 0,11)}</span><input
											type="text" style="display: none;"></td>
										<%--<td><span>${items.paymentStatus}</span><input type="text" style="display:none;"></td>--%>
										<td><span>${items.sendStatus}</span><input type="text"
											style="display: none;"></td>
										<td><span>${items.totalMoney}</span><input type="text"
											style="display: none;"></td>
										<td class="last_td">
											<%--<input class="edit_but" value="编辑" onclick="updateOrder(${items.id})" type="button">--%>
											<a class="see_but" target="page-inner"
											href="${path}/toAddSample?userId=${items.userId}&themeId=${items.themeId}&orderId=${items.id}">传片</a>
											<a class="see_but" target="page-inner"
											href="${path}/editThemeOrder?userId=${items.userId}&themeId=${items.themeId}&orderId=${items.id}">更新</a>
										</td>
									</tr>
								</c:forEach>
							</tbody>
						</table>
					</div>
				</div>
				<!-- /. ROW  -->
				<hr>
				<span style="float: right;"><a href="./photoorderList?pageNo=${page.pageNo-1 }">上一页</a>&nbsp;&nbsp;第${page.pageNo }页&nbsp;&nbsp;<a href="./photoorderList?pageNo=${page.pageNo+1 }">下一页</a></span>


			</div>
		</div>
		<!-- /. PAGE WRAPPER  -->
	</div>
	<div class="footer">


		<div class="row">
			<div class="col-lg-12">&copy;</div>
		</div>
	</div>


	<!-- /. WRAPPER  -->
	<!-- SCRIPTS -AT THE BOTOM TO REDUCE THE LOAD TIME-->
	<!-- JQUERY SCRIPTS -->
	<script src="assets/js/jquery-1.10.2.js"></script>
	<!-- BOOTSTRAP SCRIPTS -->
	<script src="assets/js/bootstrap.min.js"></script>
	<!-- CUSTOM SCRIPTS -->
	<script src="assets/js/custom.js"></script>


</body>
</html>
